#define  _CRT_SECURE_NO_WARNINGS


#include<stdio.h>
#include<string.h>

char arr[100001] = { 0 };
char* str[1001] = { 0 };
int main()
{
    gets(arr);
    int len = strlen(arr), i = 0, a[1000] = { 0 }, j = 0, max = 0;
    str[i] = strtok(arr, " ");
    while (str[i] != NULL)
    {
        i++;
        str[i] = strtok(NULL, " ");
    }
    for (j = 0; j < i; j++)
    {
        a[j] = strlen(str[j]);
    }
    for (j = 0, max = a[0]; j < i; j++)
    {
        if (a[j] > max)
            max = a[j];
    }
    for (j = 0; j < i; j++)
    {
        if (a[j] == max)
        {
            puts(str[j]);
            break;
        }
    }

    return 0;
}